package spring.security.validator;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

//注解可以打在方法上和字段上
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)//运行时
@Constraint(validatedBy = MyConstraintValidator.class)
public @interface MyConstraint {
	//当前不通过发送的信息
	String message() default "";
	
	Class<?>[] groups() default { };

	Class<? extends Payload>[] payload() default { };
	
}
